/*********************
 * P25 摩斯电码
 * t -- 150ms
 * SOS
 * S ...  di   t
 * O ---  da   3t
 * S ...
 * 单词间停顿 3t
 */
const int LED = 13;
int t = 150;
void setup() {
    pinMode(LED, OUTPUT); //板载13号灯设置为输出
}

void loop() {
    // code here
    // di
    for(int i=0; i<3; i++){
        digitalWrite(LED, HIGH);
        delay(t);
        digitalWrite(LED, LOW);
        delay(t);
    }
    delay(2 * t);
    // da
    for(int i=0; i<3; i++){
        digitalWrite(LED, HIGH);
        delay(3 * t);
        digitalWrite(LED, LOW);
        delay(t);
    }
    delay(2 * t);
    // di
    for(int i=0; i<3; i++){
        digitalWrite(LED, HIGH);
        delay(t);
        digitalWrite(LED, LOW);
        delay(t);
    }

    delay(3000);  //整个loop大循环站暂停3s
}
